import Vue from "vue";
import App from "./App.vue";
import "./registerServiceWorker";
import router from "./router";

Vue.config.productionTip = false;

Vue.filter("formTime", (val) => {

  let Y = val.getFullYear();
  let M = (val.getMonth() + 1+"").padStart(2, "0");
  let D = (val.getDate()+"").padStart(2, "0");

  let hh = (val.getHours()+"").padStart(2, "0");
  let mm = (val.getMinutes()+"").padStart(2, "0");
  let ss = (val.getSeconds()+"").padStart(2, "0");

  return `${Y}-${M}-${D} ${hh}:${mm}:${ss}`
});

// 将自动注册所有组件为全局组件
import dataV from '@jiaminghi/data-view'
Vue.use(dataV)

// import flexible from "flexible"
// console.log(flexible)

import 'lib-flexible/flexible'

new Vue({
  router,
  render: (h) => h(App),
}).$mount("#app");
